<?php

class Front_Builder {
    public function build(){
        $scripts = array(
            'script_names' => array(),
            'scripts' => ''
        );
        $frontBootstrap = new Front_Bootstrap();
        $frontBootstrap->append($scripts);
        return $scripts['scripts'] .
            "\n<script>\n\t(new Front_Loader_Singleton()).addScriptNames(['" . implode("', '", $scripts['script_names']) . "']);\n</script>\n";
    }
}